﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<SDT.Site.ViewModels.ArticleListViewModel>" %>
<%@ Import Namespace="SDT.Lib.Helpers" %>
   <%if(Model.Articles !=null && Model.Articles.Count>0){
         var first = Model.Articles[0]; %>
<div class="box_3col_tit"><%=ViewData["Title"] %></div>
<div class="box_3col_pad">
  <div>
      <a href="/article/details/<%=first.ID %>/<%=Html.ToUrlFriendly(first.Title)%>">
	        <% string imgPath = (first.ImagePath != null && first.ImagePath != string.Empty) ? SDT.Lib.Common.Utils.GenThumbnail(first.ID, 199, 147, first.ImagePath, Model.ImagePath, Model.RootImageUrl) : SDT.Lib.Common.Globals.DefaultLogo; %>
            <img src="<%=imgPath %>" title="<%=first.Title %>" alt="<%=first.Title %>" class="bor_img" width="199" height="147" style="overflow:hidden"/>
        </a>
  </div>
  <div style="display:block; height:110px; overflow:hidden">
      <div><a href="/article/details/<%=first.ID %>/<%=Html.ToUrlFriendly(first.Title)%>"><strong><%=Html.Encode(first.Title)%></strong></a></div>
      <p><%=Html.Encode(first.Summary)%></p><br />
  </div>
  <div><strong>Tin khác</strong></div>
    <div class="list">
        <%if (Model.Articles.Count > 1)
        { %>
   	    <ul>
       	  <%for(int i=1;i<Model.Articles.Count; i++){
             %>
       	    <li><a href="/article/details/<%=Model.Articles[i].ID %>/<%=Html.ToUrlFriendly(Model.Articles[i].Title)%>"><%=Html.Encode(Model.Articles[i].Title)%></a></li>              
           <%} %>
        </ul>
      <%} %>
    </div>
</div>
<%} %>

